package com.xiaotu.service.common.impl;

import cn.hutool.core.bean.BeanUtil;
import com.xiaotu.dao.common.ContactUsMsgMapper;
import com.xiaotu.dto.ContactUsMsgDto;
import com.xiaotu.model.ContactUsMsgModel;
import com.xiaotu.service.common.ContactUsMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author zhangxiao
 * @create 2021-09-03 12:39
 */
@Service
@Transactional
public class ContactUsMsgServiceImpl implements ContactUsMsgService {

    @Autowired
    private ContactUsMsgMapper contactUsMsgMapper;

    @Override
    public void submitLeaveMsg(ContactUsMsgDto contactUsMsgDto) {
        ContactUsMsgModel msgModel = new ContactUsMsgModel();
        BeanUtil.copyProperties(contactUsMsgDto, msgModel);
        contactUsMsgMapper.insert(msgModel);
    }

}
